/*
* Conditions Of Use
*
* This software was developed by employees of the Sigmatrix(Beijing) Corporation.
* This software is provided by sigmatrix as a service and is expressly
* provided "AS IS."  Sigmatrix MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY.  Sigmatrix does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement.
*
*/
package com.sigmatrix.h5.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.sigmatrix.h5.dao.DisRebateDao;
import com.sigmatrix.h5.entity.DisRebate;
import com.sigmatrix.h5.utils.Constants;
import com.sigmatrix.sc.jdbc.common.dao.DaoImpl;

/**
 *@ClassName: DisRebateDaoImpl
 *@Description: 
 *@author MH
 *@date 2017年8月16日 下午4:04:29
 */
@Repository
public class DisRebateDaoImpl extends DaoImpl<DisRebate,Integer> implements DisRebateDao{

	@Override
	public List<DisRebate> findByStrategyIdAndScanType(Integer strategyId, Short scanType) {
		StringBuffer sql = new StringBuffer();
		sql.append("select * from ").append(tableName());
		sql.append(" where _rebate_amount >0 and _strategy_id = ? and _scan_type = ? and _status = ").append(Constants.STATUS_ENABLE);
		return query(sql.toString(), strategyId,scanType);
	}

}
